Lighting device that is capable of connecting to electronic apparatus, and control method therefor

ABSTRACT

An electronic apparatus capable of confirming connection between a body and an accessory without performing communication therebetween. When transmitting first data to the accessory in synchronism with a clock signal and receiving second data from the accessory in synchronism with the clock signal, the body can perform data communication selectively by the first or second communication method. A body microcomputer changes the level of the first data from high level to low, and then further changes the same from low to high in a state where the clock signal is at high in the first communication method. The microcomputer detects a change in level of the second data responsive to the change in level of the first data, and detects accessory connection and compatibility with the second communication method based on detection result.

CROSS REFERENCE TO RELATED APPLICATION

This application is a continuation of U.S. application Ser. No.14/978,676, filed on Dec. 22, 2015, the entire disclosure of which ishereby incorporated by reference herein. This application also claimsforeign priority under 35 U.S.C. § 119 of Japanese Application No.2014-260285, filed on Dec. 24, 2014.

BACKGROUND OF THE INVENTION

Field of the Invention

The invention relates to an electronic apparatus, a method ofcontrolling the same, a storage medium, and an accessory device, andmore particularly to detection control for detecting connection betweenan electronic apparatus body and an accessory, and switching control forswitching a communication method (communication protocol) ofcommunication between the electronic apparatus body and the accessory.

Description of the Related Art

In general, electronic apparatuses include an image pickup apparatus,such as a digital camera. Conventionally, in the image pickup apparatus,such as the digital camera, when an accessory, such as a strobe deviceor an interchangeable lens unit, is connected to the body of the imagepickup apparatus (hereinafter referred to as the camera body),connection detection is performed for detecting connection ofcommunication terminals of the camera body and the accessory. Then, whenthe connection is detected, communication is performed between thecamera body and the accessory, and if the camera body receives noresponse from the accessory or there is an anomaly in received data, thecamera body determines that the connection is abnormal.

Further, when switching a communication method (i.e. a communicationprotocol), communication is performed by a communication method beforethe switching (referred to as the old communication method) to confirmcompatibility of the camera body or accessory with a communicationmethod after the switching (referred to as the new communicationmethod), and only after the compatibility is confirmed, thecommunication method is switched to the new communication method.

For example, there has been proposed a technique in which aninterchangeable lens unit is equipped with first to third informationtransmitting sections, and when the interchangeable lens unit isconnected to a camera body, the interchangeable lens unit selects thefirst information transmitting section or one of the second and thirdinformation transmitting sections to perform communication with thecamera body (see e.g. Japanese Patent Laid-Open Publication No.H02-693030). In the proposed technique, when transmitting information bythe second information transmitting section, if an interchangeable lensunit is equipped with the third information transmitting section, theinterchangeable lens unit switches the information transmitting sectionto one of the second and third information transmitting sections, forcommunication with the camera body.

However, in the camera described in Japanese Patent Laid-OpenPublication No. H02-693030, to confirm connection between theinterchangeable lens unit and the camera body, it is necessary toperform determination with respect to the contents of a response sentfrom the interchangeable lens unit to the camera body after theconnection. Therefore, the camera body is required to verify theaccuracy of the determination, and further, it takes much time toperform processing for the determination.

Further, when switching the communication method from the old one to thenew one, only after performing confirmation of the compatibility withthe new one using the old one, the communication method is changed tothe new one, so that it takes much time to change the communicationmethod.

SUMMARY OF THE INVENTION

The invention provides an electronic apparatus that is capable ofconfirming connection between a camera body and an accessory devicewithout performing communication between the camera body and theaccessory device, a method of controlling the same, a storage medium,and an accessory device.

Further, the invention provides an electronic apparatus that is capableof switching the communication method from a first communication methodto a second communication method without performing communication by thefirst communication method, a method of controlling the same, and astorage medium.

In a first aspect of the present invention, there is provided anelectronic apparatus that includes an electronic apparatus body to whichan accessory device can be connected, and performs communication betweenthe electronic apparatus body and the accessory device connectedthereto, wherein in a case where the electronic apparatus body transmitsfirst data to the accessory device in synchronism with a clock signal,and receives second data from the accessory device in synchronism withthe clock signal, the electronic apparatus body is capable of performingdata communication selectively using a first communication method and asecond communication method which is different from the firstcommunication method, and in the second communication method, a lowlevel of the second data is different in level from a low level of theclock signal and a low level of the first data in the firstcommunication method, and wherein the electronic apparatus body includesa level changing unit configured to change, in a state in which theclock signal is set to a high level in the first communication method,the first data from a high level to the low level, and then furtherchange the first data from the low level to the high level, and adetection unit configured to detect a change in level of the second dataresponsive to a change in level of the first data caused by the levelchanging unit, to thereby detect, based on a result of the detection,whether or not the accessory device is normally connected to theelectronic apparatus body, and whether or not the accessory device iscompatible with the second communication method.

In a second aspect of the present invention, there is provided a methodof controlling an electronic apparatus that includes an electronicapparatus body to which an accessory device can be connected, andperforms communication between the electronic apparatus body and theaccessory device connected thereto, the method comprising performing, ina case where the electronic apparatus body transmits first data to theaccessory device in synchronism with a clock signal and receives seconddata from the accessory device in synchronism with the clock signal,data communication selectively using a first communication method and asecond communication method which is different from the firstcommunication method, and in the second communication method, making alow level of the second data different in level from a low level of theclock signal and a low level of the first data in the firstcommunication method, changing, in a state in which the clock signal isset to the high level in the first communication method, the first datafrom a high level to the low level, and then further changing the firstdata from the low level to the high level, and detecting a change inlevel of the second data responsive to a change in level of the firstdata caused by said changing in level, to thereby detect, based on aresult of the detection, whether or not the accessory device is normallyconnected to the electronic apparatus body, and whether or not theaccessory device is compatible with the second communication method.

In a third aspect of the present invention, there is provided anon-transitory computer-readable storage medium storing acomputer-executable program for executing a method of controlling anelectronic apparatus that includes an electronic apparatus body to whichan accessory device can be connected, and performs communication betweenthe electronic apparatus body and the accessory device connectedthereto, wherein the method comprises performing, in a case where theelectronic apparatus body transmits first data to the accessory devicein synchronism with a clock signal and receives second data from theaccessory device in synchronism with the clock signal, datacommunication selectively using a first communication method and asecond communication method which is different from the firstcommunication method, and in the second communication method, making alow level of the second data different in level from a low level of theclock signal and a low level of the first data in the firstcommunication method, changing, in a state in which the clock signal isset to the high level in the first communication method, the first datafrom a high level to the low level, and then further changing the firstdata from the low level to the high level, and detecting a change inlevel of the second data responsive to a change in level of the firstdata caused by said changing in level, to thereby detect, based on aresult of the detection, whether or not the accessory device is normallyconnected to the electronic apparatus body, and whether or not theaccessory device is compatible with the second communication method.

In a fourth aspect of the present invention, there is provided anaccessory device that is capable of connecting to an electronicapparatus, and performs communication between the accessory device andthe electronic apparatus connected thereto, wherein in a case where theelectronic apparatus transmits first data to the accessory device insynchronism with a clock signal, and receives second data from theaccessory device in synchronism with the clock signal, the electronicapparatus is capable of performing data communication selectively usinga first communication method and a second communication method which isdifferent from the first communication method, and in the secondcommunication method, a low level of the second data is different inlevel from a low level of the clock signal and a low level of the firstdata in the first communication method, and wherein the accessory deviceincludes a notification unit configured to change, in a case where, in astate in which the clock signal is at a high level in the firstcommunication method, the first data is changed from a high level to thelow level and is further changed from the low level to the high level inthe first communication method, the second data from the low level to ahigh level in the second communication method to thereby notify theelectronic apparatus that the accessory device is normally connected tothe electronic apparatus, and also the accessory device is compatiblewith the second communication method.

According to the invention, it is possible to perform connectionconfirmation and switching to the second communication method in amanner preventing adverse influence from being exerted on an accessorydevice which is compatible only with the first communication method.Further, it is possible to switch to the second communication method ina short time period without performing communication by the firstcommunication method.

Further features of the present invention will become apparent from thefollowing description of exemplary embodiments (with reference to theattached drawings).

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram showing a camera as an electronic apparatusaccording to a first embodiment of the invention together with anaccessory.

FIGS. 2A to 2C are diagrams useful in explaining a communicationinterface section provided in a camera body appearing in FIG. 1, inwhich FIG. 2A shows an interface circuit thereof for a clock signaldelivered from the camera body to the accessory, FIG. 2B shows aninterface circuit thereof for communication data output from the camerabody to the accessory, and FIG. 2C shows an interface circuit thereoffor communication data input from the accessory to the camera body.

FIGS. 3A to 3C are diagrams useful in explaining a communicationinterface section provided in the accessory appearing in FIG. 1, inwhich FIG. 3A shows an interface circuit thereof for the clock signaldelivered from the camera body to the accessory, FIG. 3B shows aninterface circuit thereof for the communication data output from thecamera body to the accessory, and FIG. 3C shows an interface circuitthereof for the communication data input from the accessory to thecamera body.

FIGS. 4A to 4C are diagrams useful in explaining a case where thecommunication interface section of the accessory appearing in FIG. 1 areformed by interface circuits compatible only with a first communicationmethod, in which FIG. 4A shows an interface circuit thereof for theclock signal delivered from the camera body to the accessory, FIG. 4Bshows an interface circuit thereof for the communication data outputfrom the camera body to the accessory, and FIG. 4C shows an interfacecircuit thereof for the communication data input from the accessory tothe camera body.

FIG. 5 is a timing diagram useful in explaining states of communicationterminals (connection terminals) of the camera shown in FIG. 1 in thefirst communication method.

FIG. 6 is a timing diagram useful in explaining states of thecommunication terminals (connection terminals) of the camera shown inFIG. 1 in a second communication method.

FIG. 7 is a flowchart of a process for controlling a communicationoperation of a camera microcomputer appearing in FIG. 1.

FIG. 8 is a timing diagram useful in explaining a state of eachcommunication terminal (connection terminal) of the camera shown in FIG.1 when confirming connection of the communication terminal and shiftingthe communication method to the second communication method.

FIG. 9 is a timing diagram useful in explaining a state of eachcommunication terminal in a case where the accessory appearing in FIG. 1is compatible only with the first communication method.

FIG. 10 is a flowchart of a process for controlling a communicationoperation of an accessory microcomputer appearing in FIG. 1.

FIG. 11 is a flowchart of an SCLK_A terminal interrupt process performedby the accessory microcomputer appearing in FIG. 1.

FIG. 12 is a flowchart of a DI_A terminal interrupt process performed bythe accessory microcomputer appearing in FIG. 1.

FIG. 13 is a block diagram showing a camera as an electronic apparatusaccording to a second embodiment of the invention together with anaccessory.

FIG. 14 is a diagram of an interface circuit provided in a communicationinterface section of a camera body appearing in FIG. 13, forcommunication data input from the accessory to the camera body.

FIGS. 15A and 15B are diagrams useful in explaining a communicationinterface section provided in the accessory appearing in FIG. 13, inwhich FIG. 15A shows an interface circuit thereof for a clock signaldelivered from the camera body to the accessory, and FIG. 15B shows aninterface circuit thereof for communication data output from the camerabody to the accessory.

FIG. 16 is a flowchart of a process for controlling a communicationoperation of a camera microcomputer appearing in FIG. 13.

FIG. 17 is a flowchart of a process for controlling a communicationoperation of an accessory microcomputer appearing in FIG. 13.

FIG. 18 is a flowchart of a DI_A terminal interrupt process performed bythe accessory microcomputer appearing in FIG. 13.

DESCRIPTION OF THE EMBODIMENTS

The invention will now be described in detail below with reference tothe accompanying drawings showing embodiments thereof. In theembodiments, a digital camera (hereafter simply referred to as “thecamera”) is taken as an example of an electronic apparatus, and anaccessory, such as a lighting device, is connected to a camera body ofthe camera.

FIG. 1 is a block diagram showing the camera as the electronic apparatusaccording to a first embodiment of the invention together with theaccessory.

In the camera shown in FIG. 1, the accessory, denoted by referencenumeral 200, such as a lighting device (strobe device), is connected tothe camera body, denoted by reference numeral 100. The camera body 100is provided with a microcomputer (hereinafter referred to as the cameramicrocomputer) 101, and the camera microcomputer 101 controls the camerabody and performs communication (data communication) with the accessory200.

A communication interface (I/F) section 102 is used for connecting thecamera microcomputer 101 and an accessory microcomputer 201 provided inthe accessory 200, and is compatible with a first communication methodand a second communication method, described hereinafter. The camerabody 100 is connected to the accessory 200 via a communication contactsection 103.

The communication contact section 103 includes a clock (SCLK) terminal103 a, a data output (DO) terminal 103 b, and a data input (DI) terminal103 c. The SCLK terminal 103 a is a terminal for outputting a clocksignal from the camera body 100 to the accessory 200. The DO terminal103 b is a terminal for outputting communication data from the camerabody 100 to the accessory 200 in synchronism with the clock signal.Further, the DI terminal 103 c is a terminal for inputting communicationdata from the accessory 200 to the camera body 100 in synchronism withthe clock signal.

The accessory microcomputer 201 of the accessory 200 controls theoverall operation of the accessory 200 and communicates with the cameramicrocomputer 101. A communication interface (I/F) section 202 is usedfor connecting the camera microcomputer 101 and the accessorymicrocomputer 201, and is compatible with the first and secondcommunication methods. The accessory 200 is connected to the camera body100 via a communication contact section 203.

The communication contact section 203 includes a clock (SCLK) terminal203 a, a data output (DO) terminal 203 b, and a data input (DI) terminal203 c. The SCLK terminal 203 a, the DO terminal 203 b, and the DIterminal 203 c are connected to the SCLK terminal 103 a, the DO terminal103 b, and the DI terminal 103 c, respectively.

FIGS. 2A to 2C are diagrams useful in explaining the communicationinterface section 102 provided in the camera body 100 appearing in FIG.1, in which FIG. 2A shows an interface circuit thereof for the clocksignal delivered from the camera body 100 to the accessory 200, FIG. 2Bshows an interface circuit thereof for the communication data outputfrom the camera body 100 to the accessory 200, and FIG. 2C shows aninterface circuit thereof for the communication data input from theaccessory 200 to the camera body 100.

First, referring to FIG. 2A, a communication clock terminal SCLK_C ofthe camera microcomputer 101 is connected to a control terminal of ananalog switch 301, and is connected to a control terminal of an analogswitch 302 via an inverter 303. The analog switch 301 has one end towhich a high-level voltage (VC_1H) of the SCLK terminal 103 a isapplied, and the other end connected to a non-inverted input terminal ofan operational amplifier 310. Note that the voltage VC_1H of the SCLKterminal 103 a is a high-level voltage compatible with the firstcommunication method.

The analog switch 302 has one end to which a low-level voltage (VC_1L)of the SCLK terminal 103 a is applied, and the other end connected tothe non-inverted input terminal of the operational amplifier 310. Notethat the voltage VC_1L of the SCLK terminal 103 a is a low-level voltagecompatible with the first communication method.

The operational amplifier 310 has an output terminal connected to aninverted input terminal thereof, and when the voltage of thecommunication clock terminal SCLK_C of the camera microcomputer 101 isat a high level, the operation amplifier 310 outputs the voltage VC_1Hof the SCLK terminal 103 a, which is compatible with the firstcommunication method. On the other hand, when the voltage of thecommunication clock terminal SCLK_C of the camera microcomputer 101 isat a low level, the operation amplifier 310 outputs the voltage VC_1L ofthe SCLK terminal 103 a, which is compatible with the firstcommunication method. Further, the output terminal of the operationalamplifier 310 is connected to one end of an analog switch 330.

The communication clock terminal SCLK_C of the camera microcomputer 101is connected to an input terminal of a CMOS output buffer 321, and theCMOS output buffer 321 selectively outputs a high-level voltage (VC_2H)and a low-level voltage (VC_2L=0 V), which are compatible with thesecond communication method. Further, an output terminal of the CMOSoutput buffer 321 is connected to one end of an analog switch 331.

The analog switch 330 has the other end connected to the SCLK terminal103 a which is a communication contact between the camera body 100 andthe accessory 200, and a control terminal connected to a communicationmethod-switching signal terminal (CMOS_ON terminal) of the cameramicrocomputer 101 via an inverter 332. The analog switch 331 has theother end connected to the SCLK terminal 103 a, and a control terminalconnected to the CMOS_ON terminal of the camera microcomputer 101.

Now, assuming that the camera microcomputer 101 sets the voltage of theCMOS_ON terminal to a low level, the analog switch 330 is turned on toconnect the output terminal of the operational amplifier 310 to the SCLKterminal 103 a. That is, the voltage VC_1H or VC_1L compatible with thefirst communication method is output to the SCLK terminal 103 a.

On the other hand, assuming that the camera microcomputer 101 sets thevoltage of the CMOS_ON terminal to a high level, the analog switch 331is turned on to connect the output terminal of the CMOS output buffer321 to the SCLK terminal 103 a. That is, the voltage VC_2H or VC_2Lcompatible with the second communication method is output to the SCLKterminal 103 a.

Next, referring to FIG. 2B, a data output terminal DO_C of the cameramicrocomputer 101 is connected to a control terminal of an analog switch341, and is connected to a control terminal of an analog switch 342 viaan inverter 343. The analog switch 341 has one end to which a high-levelvoltage (VDO_1H) of the DO terminal 103 b is applied, and the other endconnected to a non-inverted input terminal of an operational amplifier350. Note that the voltage VDO_1H of the DO terminal 103 b is ahigh-level voltage compatible with the first communication method.

The analog switch 342 has one end to which a low-level voltage (VDO_1L)of the DO terminal 103 b is applied, and the other end connected to thenon-inverted input terminal of the operational amplifier 350. Note thatthe voltage VDO_1L of the DO terminal 103 b is a low-level voltagecompatible with the first communication method.

The operational amplifier 350 has an output terminal connected to aninverted input terminal thereof, and when the voltage of the data outputterminal DO_C of the camera microcomputer 101 is at a high level, theoperational amplifier 350 outputs the voltage VDO_1H of the DO terminal103 b, which is compatible with the first communication method. On theother hand, when the voltage of the data output terminal DO_C of thecamera microcomputer 101 is at a low level, the operational amplifier350 outputs the voltage VDO_1L of the DO terminal 103 b, which iscompatible with the first communication method. Further, the outputterminal of the operational amplifier 350 is connected to one end of ananalog switch 370.

The data output terminal DO_C of the camera microcomputer 101 isconnected to an input terminal of a CMOS output buffer 361, and the CMOSoutput buffer 361 selectively outputs a high-level voltage (VDO_2H) anda low-level voltage (VDO_2L=0 V), which are compatible with the secondcommunication method. Further, an output terminal of the CMOS outputbuffer 361 is connected to one end of an analog switch 371.

The analog switch 370 has the other end connected to the DO terminal 103b which is a communication contact between the camera body 100 and theaccessory 200, and a control terminal connected to the communicationmethod-switching signal terminal (CMOS_ON terminal) of the cameramicrocomputer 101 via an inverter 372. The analog switch 371 has theother end connected to the DO terminal 103 b, and a control terminalconnected to the CMOS_ON terminal of the camera microcomputer 101.

Assuming that the camera microcomputer 101 sets the voltage of theCMOS_ON terminal to the low level, the analog switch 370 is turned on toconnect the output terminal of the operational amplifier 350 to the DOterminal 103 b. That is, the voltage VDO_1H or VDO_1L compatible withthe first communication method is output to the DO terminal 103 b.

On the other hand, assuming that the camera microcomputer 101 sets thevoltage of the CMOS_ON terminal to the high level, the analog switch 371is turned on to connect the output terminal of the CMOS output buffer361 to the DO terminal 103 b. That is, the voltage VDO_2H or VDO_2Lcompatible with the second communication method is output to the DOterminal 103 b.

Next, referring to FIG. 2C, the DI terminal 103 c which is acommunication contact between the camera body 100 and the accessory 200is connected to a non-inverted input terminal of a comparator 390, andis also connected to an input terminal of a buffer 391 via an analogswitch 392. Further, the DI terminal 103 c is connected to anon-inverted input terminal of a comparator 393.

The comparator 390 has an inverted input terminal to which is applied adetermination threshold voltage Vth_DI1 for determining whether thevoltage of the DI terminal 103 c is a high-level voltage (VDI_1H) orlow-level voltage (VDI_1L) compatible with the first communicationmethod. Note that in the present example, VDI_1L<Vth_DI1<VDI_1H holds.Further, the comparator 390 has an output terminal connected to a serialdata input terminal DI_C of the camera microcomputer 101 via an analogswitch 380.

The buffer 391 is a CMOS buffer in which the power supply voltage is thehigh-level voltage (VDI_2H) of the DI terminal 103 c, which iscompatible with the second communication method, and the output of thebuffer 391 is connected to the serial data input terminal DI_C of thecamera microcomputer 101 via an analog switch 381.

The analog switch 380 has a control terminal connected to thecommunication method-switching signal terminal (CMOS_ON terminal) of thecamera microcomputer 101 via an inverter 382. Further, control terminalsof the analog switches 381 and 392 are connected to the CMOS_ON terminalof the camera microcomputer 101.

The comparator 393 has a non-inverted input terminal to which is applieda connection confirmation voltage Vth_DI2 for confirming connection ofthe DI terminal 103 c. Note that in the present example, 0V<Vth_DI2<VDI_1L holds. Further, the connection confirmation voltageVth_DI2 may be set to a determination threshold voltage for determiningwhether the voltage is the high-level voltage or the low-level voltagein the second communication method. Further, the comparator 393 has anoutput terminal connected to a connection confirmation determinationport (DI_OK) of the camera microcomputer 101.

With this configuration, when the camera microcomputer 101 sets thevoltage of the CMOS_ON terminal to the low level, the output from andinput to the communication contact section 103 can be set to those inthe first communication method. Further, when the camera microcomputer101 sets the voltage of the CMOS_ON terminal to the high level, theoutput from and input to the communication contact section 103 can beset to those in the second communication method.

FIGS. 3A to 3C are diagrams useful in explaining the communicationinterface section 202 provided in the accessory 200 appearing in FIG. 1,in which FIG. 3A shows an interface circuit thereof for the clock signaldelivered from the camera body 100 to the accessory 200, FIG. 3B showsan interface circuit thereof for the communication data output from thecamera body 100 to the accessory 200, and FIG. 3C shows an interfacecircuit thereof for the communication data input from the accessory 200to the camera body 100.

First, referring to FIG. 3A, the SCLK terminal 203 a which is acommunication contact between the camera body 100 and the accessory 200is connected to a non-inverted input terminal of a comparator 401, andis connected to a non-inverted input terminal of a comparator 402.Further, the SCLK terminal 203 a is connected to a non-inverted inputterminal of a comparator 403, and is connected to an input terminal of abuffer 412 via an analog switch 411.

The comparator 401 has an inverted input terminal to which is applied adetermination threshold voltage Vth_C3 for determining whether thevoltage of the SCLK terminal 203 a is the high-level voltage (VC_1H)compatible with the first communication method or the high-level voltage(VC_2H) compatible with the second communication method. Note that inthe present example, VC_2H<Vth_C3<VC_1H holds. Further, the comparator401 has an output terminal connected to a CHK_CMOS terminal of theaccessory microcomputer 201.

The comparator 402 has an inverted input terminal to which is applied athreshold voltage Vth_C1 for determining whether the voltage of the SCLKterminal 203 a is the high-level voltage (VC_1H) or low-level voltage(VC_1L) compatible with the first communication method. Note that in thepresent example, VC_1L<Vth_C1<VC_1H holds.

Further, the comparator 402 has an output terminal connected to a clockinput terminal SCLK_A of the accessory microcomputer 201 via an analogswitch 413.

The comparator 403 has an inverted input terminal to which is applied adetermination threshold voltage Vth_C2 which is between the high-levelvoltage (VC_2H) and the low-level voltage (VC_2L=0 V) of the SCLKterminal 203 a, which are compatible with the second communicationmethod, and is lower than the low-level voltage (VC_1L) in the firstcommunication method. Further, the comparator 403 has an output terminalconnected to an SCLK_OK terminal of the accessory microcomputer 201.

The buffer 412 is a CMOS buffer in which the power supply voltage is thehigh-level voltage (VC_2H) of the SCLK terminal 203 a, which iscompatible with the second communication method, and has an outputterminal connected to the clock input terminal (SCLK) of the accessorymicrocomputer 201 via an analog switch 414.

The analog switch 413 has a control terminal connected to acommunication method-switching signal terminal (SCLK_CMOS_ON terminal)of the accessory microcomputer 201 via an inverter 415. Further, controlterminals of the analog switches 411 and 414 are connected to theSCLK_CMOS_ON terminal of the accessory microcomputer 201.

Next, referring to FIG. 3B, the DO terminal 203 b which is acommunication contact between the camera body 100 and the accessory 200is connected to a non-inverted input terminal of a comparator 421, andis also connected to a non-inverted input terminal of a comparator 422.Further, the DO terminal 203 b is connected to an input terminal of abuffer 432 via an analog switch 431.

The comparator 421 has an inverted input terminal to which is applied athreshold voltage Vth_DO1 for determining whether the voltage of the DOterminal 203 b is the high-level voltage (VDO_1H) or low-level voltage(VDO_1L) compatible with the first communication method. Note that inthe present example, VDO_1L<Vth_DO1<VDO_1H holds. Further, thecomparator 421 has an output terminal connected to a data input terminal(DI_A) of the accessory microcomputer 201 via an analog switch 433.

The comparator 422 has an inverted input terminal to which is applied athreshold voltage (connection confirmation voltage) Vth_DO2 which isbetween the high-level voltage (VDO_2H) and the low-level voltage(VDO_2L=0 V) of the DO terminal 203 b, which are compatible with thesecond communication method, and is lower than the low-level voltage(VDO_1L) compatible with the first communication method. Further, thecomparator 422 has an output terminal connected to a DO_OK terminal ofthe accessory microcomputer 201.

The buffer 432 is a CMOS buffer in which the power supply voltage is thehigh-level voltage (VDO_2H) of the DO terminal 203 b, which iscompatible with the second communication method, and has an outputterminal connected to the data input terminal (DI_A) of the accessorymicrocomputer 201 via an analog switch 434.

The analog switch 433 has a control terminal connected to acommunication method-switching signal terminal (DO_CMOS_ON terminal) ofthe accessory microcomputer 201 via an inverter 435. Further, controlterminals of the analog switches 431 and 434 are connected to theDO_CMOS_ON terminal of the accessory microcomputer 201.

Next, referring to FIG. 3C, the data output terminal (DO_A) of theaccessory microcomputer 201 is connected to a control terminal of ananalog switch 451, and is connected to a control terminal of an analogswitch 452 via an inverter 453. The analog switch 451 has one end towhich is applied the high-level voltage (VDI_1H) of the DI terminal 203a, which is compatible with the first communication method, and theother end connected to a non-inverted input terminal of an operationalamplifier 460.

The analog switch 452 has one end to which is applied the low-levelvoltage (VDI_1L) of the DI terminal 203 c, which is compatible with thefirst communication method, and the other end connected to anon-inverted input terminal of the operational amplifier 460.

The operational amplifier 460 has an output terminal connected to aninverted input terminal thereof. When the voltage of the DO_A terminalof the accessory microcomputer 201 is at a high level, the operationalamplifier 460 outputs the high-level voltage (VDI_1H) of the DI terminal203 c, which is compatible with the first communication method. On theother hand, when the voltage of the DO_A terminal of the accessorymicrocomputer 201 is at a low level, the operational amplifier 460outputs the low-level voltage (VDI_1L) of the DI terminal 203 c, whichis compatible with the first communication method. Further, the outputterminal of the operational amplifier 460 is connected to one end of ananalog switch 480.

The data output terminal (DO_A) of the accessory microcomputer 201 isconnected to an input terminal of a CMOS output buffer 471 that outputsa high-level voltage (VDI_2H) or low level (VDI_2L=0 V) compatible withthe second communication method to the DI terminal 203 c . Further, anoutput terminal of the CMOS output buffer 471 is connected to one end ofan analog switch 481.

The analog switch 480 has the other end connected to the DI terminal 203cwhich is a communication contact between the camera body 100 and theaccessory 200. Further, the analog switch 480 has a control terminalconnected to a communication method-switching signal terminal(DI_CMOS_ON terminal) of the accessory microcomputer 201 via an inverter482.

Similarly, the analog switch 481 has the other end connected to the DIterminal 203 c. Further, the analog switch 481 has a control terminalconnected to the communication method-switching signal terminal(DI_CMOS_ON terminal) of the accessory microcomputer 201.

With this configuration, when the accessory microcomputer 201 sets thevoltage of the CMOS_ON terminal to the low level, the output from andinput to the communication contact section 203 can be set to those inthe first communication method. Further, when the accessorymicrocomputer 201 sets the voltage of the CMOS_ON terminal to the highlevel, the output from and input to the communication contact section203 can be set to those in the second communication method.

FIGS. 4A to 4C are diagrams useful in explaining a case where thecommunication interface section 202 of the accessory 200 appearing inFIG. 1 are formed by interface circuits compatible only with the firstcommunication method, in which FIG. 4A shows an interface circuitthereof for the clock signal delivered from the camera body 100 to theaccessory 200, FIG. 4B shows an interface circuit thereof for thecommunication data output from the camera body 100 to the accessory 200,and FIG. 4C shows an interface circuit thereof for the communicationdata input from the accessory 200 to the camera body 100.

Referring to FIG. 4A, the SCLK terminal 203 a which is the communicationcontact between the camera body 100 and the accessory 200 is connectedto a non-inverted input terminal of a comparator 502 and a non-invertedinput terminal of a comparator 503. The comparator 502 has an invertedinput terminal to which is applied the threshold voltage Vth_C1 fordetermining whether the voltage of the SCLK terminal 203 a is thehigh-level voltage (VC_1H) or low-level voltage (VC_1L) compatible withthe first communication method. Note that in the present example,VC_1L<Vth_C1<VC_1H holds. Further, the comparator 502 has an outputterminal connected to the clock input terminal SCLK_A of the accessorymicrocomputer 201.

The comparator 503 has an inverted input terminal to which is appliedthe threshold voltage Vth_C2 which is between the high-level voltage(VC_2H) and the low-level voltage (VC_2L=0 V) of the SCLK terminal 203a, which are compatible with the second communication method, and alsois lower than the low-level voltage (VC_1L) compatible with the firstcommunication method. Further, the comparator 503 has an output terminalconnected to the SCLK_OK terminal of the accessory microcomputer 201.

Referring to FIG. 4B, the DO terminal 203 b which is the communicationcontact point between the camera body 100 and the accessory 200 isconnected to a non-inverted input terminal of a comparator 521 and anon-inverted input terminal of a comparator 522. The comparator 521 hasan inverted input terminal to which is applied the threshold voltageVth_DO1 for determining whether the voltage of the DO terminal 203 b isthe high-level voltage (VDO_1H) or low-level voltage (VDO_1L) compatiblewith the first communication method. Note that in the present example,VDO_1L<Vth_DO1<VDO_1H holds. Further, the comparator 521 has an outputterminal connected to the data input terminal DI_A of the accessorymicrocomputer 201.

The comparator 522 has an inverted input terminal to which is appliedthe threshold voltage Vth_DO2 which is between the high-level voltage(VDO_2H) and the low-level voltage (VDO_2L=0 V) of the DO terminal 203b, which are compatible with the second communication method, and alsois lower than the low-level voltage (VDO_1L) compatible with the firstcommunication method. Further, the comparator 522 has an output terminalconnected to the DO_OK terminal of the accessory microcomputer 201.

Next, referring to FIG. 4C, the data output terminal DO_A of theaccessory microcomputer 201 is connected to a control terminal of ananalog switch 551, and is connected to a control terminal of an analogswitch 552 via an inverter 553. The analog switch 551 has one end towhich is applied the high-level voltage (VDI_1H) of the DI terminal 203a, which is compatible with the first communication method, and theother end connected to a non-inverted input terminal of an operationalamplifier 560.

The analog switch 552 has one end to which is applied the low-levelvoltage (VDI_1L) of the DI terminal 203 c, which is compatible with thefirst communication method. Further, the analog switch 552 has the otherend connected to the non-inverted input terminal of the operationalamplifier 560.

The operational amplifier 560 has an output terminal connected to aninverted input terminal thereof and the DI terminal 203 c. When thevoltage of the DO_A terminal of the accessory microcomputer 201 is atthe high level, the operational amplifier 560 outputs the high-levelvoltage (VDI_1H) of the DI terminal 203 c, which is compatible with thefirst communication method. On the other hand, when the voltage of theDO_A terminal of the accessory microcomputer 201 is at the low level,the operational amplifier 560 outputs the low-level voltage (VDI_1L) ofthe DI terminal 203 c, which is compatible with the first communicationmethod.

FIG. 5 is a timing diagram useful in explaining states of thecommunication terminals (connection terminals) of the camera shown inFIG. 1 in the first communication method.

Referring to FIG. 5, the high level and low level of the SCLK signal arerepresented by VC_1H and VC_1L, respectively. Further, the thresholdvalue set between the high level and the low level is represented byVth_C1, and VC_1L is higher than Vth_C2 (>0 V).

The high level and low level of the DO signal are represented by VDO_1Hand VDO_1L (>0 V), respectively. Further, the threshold value setbetween the high level and the low level is represented by Vth_DO1, andVDO_1L is higher than Vth_DO2 (>0 V).

The high level and low level of the DI signal are represented by VDI_1Hand VDI_1L (>0 V), respectively. Further, the threshold value setbetween the high level and the low level is represented by Vth_DI1, andVDI_1L is higher than Vth_DI2 (>0 V).

For example, when the camera is started at a time point T1, if the DIsignal is at VDI_1H, it indicates that the accessory microcomputer 201is in a communicable state. On the other hand, if the DI signal is atVDI_1L, it indicates that the accessory microcomputer 201 is in anincommunicable (busy) state.

At a time point T2, the camera microcomputer 101 confirms that the DIsignal indicates that the accessory microcomputer 201 has exited thebusy state. Then, at a time point T3, the camera microcomputer 101starts communication and delivers the SCLK signal to the accessory 200(from T3 to T4).

At a time point T5, the accessory microcomputer 201 sets the DI signalto the VDI_1L level so as to analyze the received data and enters thebusy state (from T5 to T6). Then, at a time point T7, the cameramicrocomputer 101 confirms that the accessory 200 has exited the busystate again, whereupon the camera microcomputer 101 starts the nextcommunication.

FIG. 6 is a timing diagram useful in explaining states of thecommunication terminals (connection terminals) of the camera shown inFIG. 1 in the second communication method.

Referring to FIG. 6, the high level and low level of the SCLK signal arerepresented by VC_2H (VC_1L<VC_2H<VC_1H) and VC_2L (=0 V), respectively.Further, the high level and low level of the DO signal are representedby VDO_2H (≤VDO_1H) and VDO_2L (=0 V), respectively. Further, the highlevel and low level of the DI signal are represented by VDI_2H (≤VDI_1H)and VDI_2L (=0 V), respectively.

When the DI signal is at VDI_2H, the accessory microcomputer 201 is in acommunicable state, whereas when the DI signal is at VDI_2L, theaccessory microcomputer 201 is in an incommunicable (busy) state. At atime point T2, the camera microcomputer 101 confirms that the accessorymicrocomputer 201 has exited from the busy state. Then, at a time pointT3, the camera microcomputer 101 starts communication (from T3 to T4).

At a time point T5, the accessory microcomputer 201 sets the DI signalto a VDI_2L level so as to analyze the received data, and enters thebusy state (from T5 to T6). Then, when the camera microcomputer 101confirms that the accessory microcomputer 201 has exited the busy stateagain at a time point T7, the camera microcomputer 101 starts the nextcommunication.

FIG. 7 is a flowchart of a process for controlling a communicationoperation of the camera microcomputer 101 appearing in FIG. 1.

Further, FIG. 8 is a timing diagram useful in explaining a state of eachcommunication terminal (connection terminal) of the camera shown in FIG.1 when confirming connection of the communication terminal and shiftingthe communication method to the second communication method. Further,FIG. 9 is a timing diagram useful in explaining a state of eachcommunication terminal in a case where the accessory 200 appearing inFIG. 1 is compatible only with the first communication method.

Referring to FIGS. 7 to 9, when the camera microcomputer 101 is startedor a release switch (not shown) thereof is half-pressed, the cameramicrocomputer 101 sets the voltage of the CMOS_ON terminal to the lowlevel to thereby set the communication interface section 102 to thefirst communication method (step S101). Then, the camera microcomputer101 supplies electric power to the communication interface section 102to thereby turn on the output of the communication interface section 102(step S102). At this time, the camera microcomputer 101 sets thevoltages of the DO_C terminal and the SCLK_C terminal to the high levels(at a time point T1 in FIG. 8).

Then, the camera microcomputer 101 determines whether or not the voltageof the DI_OK terminal is at the high level (step S103). If the voltageof the DI_OK terminal is at the low level (No to the step S103), thecamera microcomputer 101 determines that the accessory 200 is notconnected to the terminals of the communication contact section 103(step S120). Then, the camera microcomputer 101 returns to the stepS103, and monitors the connection state of the terminals of thecommunication contact section 103 until the operation of the camera 100is stopped.

If the voltage of the DI_OK terminal is at the high level (YES to thestep S103), the camera microcomputer 101 confirms connection to theaccessory 200, and starts to check whether or not the accessory 200 iscompatible with the second communication method. In this step, first,the camera microcomputer 101 sets the voltage of the DO_C terminal tothe low level (step S104).

With this, the camera microcomputer 101 sets the voltage of theconnection terminal 103 b (DO terminal) to VDO_1L in a state where thevoltage of the connection terminal 103 a (SCLK terminal) is at VC_1H (ata time point T2 in FIGS. 8 and 9).

Next, the camera microcomputer 101 waits for a predetermined time period(time period within which a response to the DI signal can be receivedfrom the accessory 200: up to a time point T3 in FIG. 8) (step S105:WAIT). Then, the camera microcomputer 101 determines whether or not thevoltage of the DI_OK terminal is at the low level (step S106).

If the voltage of the DI_OK terminal is at the high level (NO to thestep S106), the camera microcomputer 101 determines that connection ofthe connected accessory 200 has not been confirmed and that there is apossibility that the accessory 200 is compatible only with the firstcommunication method, so that the camera microcomputer 101 sets thevoltage of the DO_C terminal to the high level (step S150: at a timepoint T5 in FIG. 9).

Then, the camera microcomputer 101 determines whether or not the DI_Cterminal is at the low level (step S151). If the voltage of the DI_Cterminal is at the low level (YES to the step S151), i.e. if theconnection terminal 103 c (DI terminal) is at VDI_1L, which means thatthe accessory 200 is in the busy state, the camera microcomputer 101determines whether or not a timeout period has elapsed (step S152). Inthis step, the camera microcomputer 101 determines whether or not astate where the voltage of the DI_C terminal is at the low level hascontinued for a predetermined time period (sum of one byte time by thefirst communication method and an upper limit of busy time of theaccessory 200).

If the timeout period has not elapsed (NO to the step S152), the cameramicrocomputer 101 returns to the step S151. On the other hand, if thetimeout period has elapsed (YES to the step S152), the cameramicrocomputer 101 proceeds to a step S123, described hereinafter.

If the voltage of the DI_C terminal is at the high level (No to the stepS151), the camera microcomputer 101 clears a timer for counting a timeperiod during which the voltage of the DI_C terminal is at the low level(step S153), and communicates with the accessory 200 by the firstcommunication method. Then, the camera microcomputer 101 returns to thestep S151 (time from a time point T8 to a time point T9 in FIG. 9).

If the voltage of the DI_OK terminal is at the low level (YES to thestep S106), the camera microcomputer 101 sets the voltage of the DO_Cterminal to the high level (step S107) to thereby set the voltage of theconnection terminal 103 b (DO terminal) to VDO_1H (at a time point T4 inFIG. 8). Then, the camera microcomputer 101 waits for a predeterminedtime period (time period within which a response to the DI signal can bereceived from the accessory 200) (step S108) (at a time point T5 in FIG.8).

Then, the camera microcomputer 101 determines whether or not the voltageof the DI_OK terminal is at the high level (step S109). If the voltageof the DI_OK terminal is at the low level (NO to the step S109), thecamera microcomputer 101 proceeds to the step S123, describedhereinafter.

If the voltage of the DI_OK terminal is at the high level (YES to thestep S109), judging that connection of the camera microcomputer 101 tothe accessory 200 and compatibility of the accessory 200 with the secondcommunication method have been confirmed, the camera microcomputer 101sets the voltage of the CMOS_ON terminal to the high level (step S110).This switches the communication method of the communication interfacesection 102 to the second communication method (at a time point T6 inFIG. 8).

As a result, the connection terminal 103 a (SCLK terminal) is changed toVC_2H, and the connection terminal 103 b (DO terminal) is at VDO_2H.Note that in the DO terminal, VDO_1H=VDO_2H holds.

Then, the camera microcomputer 101 determines whether or not the voltageof the DI_OK terminal is at the low level so as to confirm whether ornot the communication method of the accessory 200 has been changed tothe second communication method (step S111). If the voltage of the DI_OKterminal is at the high level (NO to the step S111), the cameramicrocomputer 101 determines whether or not a timeout period has elapsed(step S130). In this step, the camera microcomputer 101 determineswhether or not the time period in which a response to the DI signal canbe received from the accessory 200 has elapsed (time period up to a timepoint T7 in FIG. 8).

If the timeout period has elapsed (YES to the step S130), the cameramicrocomputer 101 proceeds to the step S123, described hereinafter. Onthe other hand, if the timeout period has not elapsed (NO to the stepS130), the camera microcomputer 101 returns to the step S111.

If the voltage of the DI_OK terminal is at the low level (YES to thestep S111), the camera microcomputer 101 determines whether or not thevoltage level of the DI_OK terminal is changed to the high level (stepS112). If the voltage level of the DI_OK terminal is not changed to thehigh level, i.e. if the DI_OK terminal remains at the low level (NO tothe step S112), the camera microcomputer 101 determines whether or not atimeout period has elapsed (step S131). In this step, the cameramicrocomputer 101 determines whether or not the time period in which aresponse can be received from the accessory 200 has elapsed (time periodup to a time point T8 in FIG. 8).

If the timeout period has elapsed (YES to the step S131), the cameramicrocomputer 101 proceeds to the step S123, described hereinafter. Onthe other hand, if the timeout period has not elapsed (NO to the stepS131), the camera microcomputer 101 returns to the step S112.

If the voltage level of the DI_OK terminal is changed to the high level(YES to the step S112), the camera microcomputer 101 determines that theaccessory 200 has completed changing the communication method to thesecond communication method to make the accessory 200 communicable (atthe time point T8 in FIG. 8). Then, the camera microcomputer 101communicates with the accessory 200 by the second communication method(step S113).

Then, the camera microcomputer 101 determines whether or not the voltageof the DI_C terminal is at the low level (step S114). If the voltage ofthe DI_C terminal is at the high level (NO to the step S114), the cameramicrocomputer 101 clears a timer for counting a time period during whichthe voltage of the DI_C terminal is at the low level (step S115), andreturns to the step S113.

On the other hand, if the voltage of the DI_C terminal is at the lowlevel (YES to the step S114), the camera microcomputer 101 determineswhether or not the timeout period has elapsed (step S116). In this step,the camera microcomputer 101 determines whether or not the sum of onebyte time by the second communication method and the upper limit of busytime of the accessory 200 has elapsed.

If the timeout period has not elapsed (NO to the step S116), the cameramicrocomputer 101 returns to the step S114. On the other hand, if thetimeout period has elapsed (YES to the step S116), the cameramicrocomputer 101 determines that the accessory 200 has beendisconnected or the accessory 200 is in a power-off state (step S123:connection NG).

Next, the camera microcomputer 101 sets the voltage of the CMOS_ONterminal to the low level (step S140) to thereby set the communicationinterface section 102 to the first communication method. Thereafter, thecamera microcomputer 101 stops power supply to the communicationinterface section 102 to thereby turn off the output of thecommunication interface section 102 (step S141), followed by terminatingcommunication with the accessory 200.

FIG. 10 is a flowchart of a process for controlling a communicationoperation of the accessory microcomputer 201 appearing in FIG. 1.

After starting the communication operation, the accessory microcomputer201 determines whether or not the voltage of the DO_OK terminal is atthe high level so as to check whether or not the voltage of the DOterminal (connection terminal 203 b appearing in FIGS. 3A to 3C) ishigher than the connection confirmation voltage Vth_DO2 (step S301). Ifthe voltage of the DO_OK terminal is at the low level (NO to the stepS301), the accessory microcomputer 201 waits until the accessory 200 isconnected to the camera body 100 and also the camera enters an activatedstate.

If the voltage of the DO_OK terminal is at the high level (YES to thestep S301), the accessory microcomputer 201 sets the voltages of theSCLK_CMOS_ON terminal, the DO_CMOS_ON terminal, and the DI_CMOS_ONterminal to the low levels to thereby set the communication method ofthe communication interface section 202 to the first communicationmethod (step S302).

Next, the accessory microcomputer 201 sets the voltage of the connectionterminal 203 c (DI terminal) to VDI_1L (at the time point T1 in FIG. 8)and sets the voltage of the DO_A terminal to the low level (step S303).The accessory microcomputer 201 thus notifies the camera body 100 of thebusy state of the accessory 200.

Next, when the voltage of the connection terminal 203 b (DO terminal) ischanged from VDO_1H to VOD_1L, the accessory microcomputer 201 permitsinterruption (hereinafter referred to as the DI_A terminal interrupt ofthe accessory microcomputer 201). Further, when the voltage of the SCLKterminal 203 a is changed from VC_1H to VC_1L due to the start ofcommunication, the accessory microcomputer 201 permits interruption(step S304: SCLK_A terminal interrupt of the accessory microcomputer201).

Then, the accessory microcomputer 201 checks whether or not the voltageof the DO_OK terminal is at the high level (step S305). If the voltageof the DO_OK terminal is at the high level (YES to the step S305), theaccessory microcomputer 201 performs predetermined various processingoperations on communication data (step S306). Then, the accessorymicrocomputer 201 determines whether or not the state of the accessory200 is changed to the communicable state by the processing operationsperformed in the step S306 (step S308).

If the accessory 200 has been changed into the communicable state (YESto the step S308), the accessory microcomputer 201 sets communicationpermission (step S309). Then, the accessory microcomputer 201 sets thevoltage of the DO_A terminal to the high level (step S310) to therebynotify the camera body 101 via the connection terminal 203 c (DIterminal) that the accessory microcomputer 201 has exited the busystate. Then, the accessory microcomputer 201 returns to the step S305.

If the accessory 200 has not been changed into the communicable state(NO to the step S308), the accessory microcomputer 201 sets the voltageof the DO_A terminal to the low level (step S321) to thereby notify thecamera body 100 of the busy state thereof via the connection terminal203 c (DI terminal). Then, the accessory microcomputer 201 returns tothe step S305.

If the voltage of the DO_OK terminal is at the low level (NO to the stepS305), judging that the interface of the camera body 100 is powered offor the camera body 100 has been disconnected, the accessorymicrocomputer 201 sets the voltages of the SCLK_CMOS_ON terminal, theDO_CMOS_ON terminal, and the DI_CMOS_ON terminal to the low levels (stepS330). The accessory microcomputer 201 thus sets the communicationmethod of the communication interface section 202 to the firstcommunication method. Thereafter, the accessory microcomputer 201 turnsoff the output of the connection terminal 203 c (DI terminal) (stepS331) and returns to the step S301.

FIG. 11 is a flowchart of an SCLK_A terminal interrupt process performedby the accessory microcomputer 201 appearing in FIG. 1.

When the camera microcomputer 101 changes the voltage of the connectionterminal 101 a (SCLK terminal) from VC_1H to VC_1L, the accessorymicrocomputer 201 starts the interrupt process. First, the accessorymicrocomputer 201 sets a flag indicative of an SCLK_A terminal interrupt(step S401: SCLK_A terminal interrupt FLG=H).

Then, the accessory microcomputer 201 determines whether or not the SCLKsignal has been received from the camera microcomputer 101 apredetermined number of (e.g. 8) times (step S402). If the number oftimes of reception of the SCLK signal has not reached the predeterminednumber (NO to the step S402), the accessory microcomputer 201 waits.

On the other hand, if the SCLK signal has been received thepredetermined number of times (YES to the step S402), the accessorymicrocomputer 201 sets the voltage of the DO_A terminal to the low level(step S403) to thereby notify the camera body 100 of the busy statethereof via the connection terminal 203 c (DI terminal). Then, theaccessory microcomputer 201 analyzes data received via the connectionterminal 203 b (DO terminal) (step S404), followed by terminating theinterrupt process.

FIG. 12 is a flowchart of a DI_A terminal interrupt process performed bythe accessory microcomputer 201 appearing in FIG. 1.

When the camera microcomputer 101 changes the voltage of the connectionterminal 101 b (DO terminal) from VDO_1H to VDO_1L, the accessorymicrocomputer 201 starts the interrupt process (at the time point T2 inFIG. 8). Then, the accessory microcomputer 201 determines whether or notSCLK_A terminal interrupt FLG=H holds (step S501). That is, theaccessory microcomputer 201 determines whether or not communication bythe first communication method has been performed before the cameramicrocomputer 101 performs confirmation of connection and compatibilitywith the second communication method of the accessory 200.

If the SCLK_A terminal interrupt FLG=H holds (YES to the step S501), theaccessory microcomputer 201 determines that communication by the firstcommunication method has been performed and inhibits the DI_A terminalinterrupt (step S530), followed by terminating the interrupt process.

If the SCLK_A terminal interrupt FLG=H does not hold (NO to the stepS501), the accessory microcomputer 201 determines whether or not thevoltage of the DO_OK terminal is at the high level and also the voltageof the CHK_CMOS terminal is at the high level (step S502). If thevoltage of the DO_OK terminal is at the high level and also the voltageof the CHK_CMOS terminal is at the high level (YES to the step S502),the accessory microcomputer 201 sets the voltage of the DI_CMOS_ONterminal to the high level so as to respond to the connection check fromthe camera microcomputer 101 (step S503). That is, the accessorymicrocomputer 201 sets the connection terminal 203 c (DI terminal) tothe second communication method.

Then, the accessory microcomputer 201 sets the voltage of the DO_Aterminal to the low level (step S504). Then, the accessory microcomputer201 outputs the voltage VDI_2L (0 V) to the connection terminal 203 c(DI terminal) (at the time point T3 in FIG. 8). Thereafter, theaccessory microcomputer 201 determines whether or not the voltage of theDI_A terminal is changed to the high level (step S505). That is, theaccessory microcomputer 201 determines whether or not the voltage of theconnection terminal 203 b (DO terminal) is changed to VDO_1H (at thetime point T4 in FIG. 8).

If the voltage of the DI_A terminal remains at the low level (NO to thestep S505), the accessory microcomputer 201 determines whether or not apredetermined timeout period has elapsed (step S520). In this step, theaccessory microcomputer 201 determines whether or not a time period haselapsed which takes for the camera microcomputer 101 to detect VDI_2L ofthe connection terminal 203 c (DI terminal) and change the voltage ofthe connection terminal 203 b (DO terminal) from VDO_1L to VDO_1H.

If the predetermined timeout period has elapsed (YES to the step S520),the accessory microcomputer 201 proceeds to a step S523, describedhereinafter. On the other hand, if the predetermined timeout period hasnot elapsed (NO to the step S520), the accessory microcomputer 201returns to the step S505.

If the voltage of the DI_A terminal is at the high level (YES to thestep S505), the accessory microcomputer 201 sets the voltage of the DO_Aterminal to the high level (step S506). That is, the accessorymicrocomputer 201 sets the voltage of the connection terminal 203 c (DIterminal) to VDI_2H (at the time point T5 in FIG. 8).

Then, the accessory microcomputer 201 determines whether or not thevoltage of the CHK_CMOS terminal is changed to the low level (stepS507). That is, the accessory microcomputer 201 determines whether ornot the voltage of the connection terminal 203 a (SCLK terminal) ischanged to VC_2H (at the time point T6 in FIG. 8).

If the CHK_ CMOS terminal remains at the high level (NO to the stepS507), the accessory microcomputer 201 determines whether or not apredetermined timeout period has elapsed (step S521). In this step, theaccessory microcomputer 201 determines whether or not a time period haselapsed which takes for the camera microcomputer 101 to detect VDI_2H ofthe connection terminal 203 c (DI terminal) and change the voltage ofthe connection terminal 203 a (SCLK terminal) from VC_1H to VC_2H.

If the predetermined timeout period has elapsed (YES to the step S521),the accessory microcomputer 201 proceeds to the step S523, describedhereinafter. On the other hand, if the predetermined timeout period hasnot elapsed (NO to the step S521), the accessory microcomputer 201returns to the step S507.

If the voltage of the CHK_CMOS terminal is changed to the low level (YESto the step S507), the accessory microcomputer 201 determines whether ornot the voltage of the SCLK_OK terminal is at the high level (stepS508). Then, if the voltage of the SCLK_OK terminal is at the low level(NO to the step S508), the accessory microcomputer 201 proceeds to thestep S523, described hereinafter.

If the voltage of the SCLK_OK terminal is at the high level (YES to thestep S508), the accessory microcomputer 201 sets the voltage of the DO_Aterminal to the low level (step S509). That is, the accessorymicrocomputer 201 sets the voltage of the connection terminal 203 c (DIterminal) to VDI_2L (0 V) to thereby notify the camera body 100 of thebusy state thereof.

Next, the accessory microcomputer 201 determines whether or not theaccessory 200 is in the communicable state (step S510). If the accessory200 is not in the communicable state (NO to the step S510), theaccessory microcomputer 201 waits. On the other hand, if the accessory200 is in the communicable state (YES to the step S510), the accessorymicrocomputer 201 sets the voltages of the SCLK_CMOS_ON terminal, theDO_CMOS_ON terminal, and the DI_CMOS_ON terminal to the high levels(step S511). The accessory microcomputer 201 thus sets the communicationmethod of the communication interface section 202 to the secondcommunication method.

Then, the accessory microcomputer 201 sets the voltage of the DO_Aterminal to the high level (step S512). That is, the accessorymicrocomputer 201 sets the voltage of the connection terminal 203 c (DIterminal) to VDI_2H to thereby notify the camera body 100 that theaccessory microcomputer 201 has exited the busy state (at the time pointT8 in FIG. 8), followed by terminating the interrupt process.

If it is determined in the step S502 that the DO_OK terminal is at thelow level or the CHK_CMOS terminal is at the low level (NO to the stepS502), the accessory microcomputer 201 determines that the communicationmethod has not been normally switched to the second communicationmethod, the interface of the camera has been powered off, or the camerahas been disconnected. Then, the accessory microcomputer 201 sets thevoltages of the SCLK_CMOS_ON terminal, the DO_CMOS_ON terminal, and theDI_CMOS_ON terminal to the low levels (step S523). The accessorymicrocomputer 201 thus sets the communication method of thecommunication interface section 202 to the first communication method.

Next, the accessory microcomputer 201 turns off the output of theconnection terminal 203 c (DI terminal) (step S524), followed byterminating the interrupt process.

As described above, in the first embodiment of the invention, it ispossible to perform connection confirmation and switching to the secondcommunication method in a manner preventing adverse influence from beingexerted on an accessory device which is compatible only with the firstcommunication method. Further, it is possible to switch to the secondcommunication method in a short time period without performingcommunication by the first communication method.

Next, a description will be given of a camera as an electronic apparatusaccording to a second embodiment of the invention.

FIG. 13 is a block diagram showing the camera as the electronicapparatus according to the second embodiment together with an accessory.In FIG. 13, the same components as those of the camera shown in FIG. 1are denoted by the same reference numerals.

In the camera shown in FIG. 13, an accessory 1200, such as a lightingdevice (strobe device), is connected to a camera body 1100. The camerabody 1100 is provided with a camera microcomputer 1101, and the cameramicrocomputer 1101 controls the overall operation of the camera body1100 and communicates with the accessory 1200.

An interface (I/F) circuit 1102 is used for connecting the cameramicrocomputer 1101 and an accessory microcomputer 1201 provided in theaccessory 1200 and is compatible with the first communication method andthe second communication method. The camera body 1100 is connected tothe accessory 1200 via the communication contact section 103.

The accessory microcomputer 1201 of the accessory 1200 controls theoverall operation of the accessory 1200 and communicates with the cameramicrocomputer 1101. A communication interface (I/F) section 1202 is usedfor connecting the camera microcomputer 1101 and the accessorymicrocomputer 1201 and is compatible with the first and secondcommunication methods. The accessory 1200 is connected to the camerabody 1100 via the communication contact section 203.

FIG. 14 is a diagram of an interface circuit provided in thecommunication interface section 1102 of the camera body 1100 appearingin FIG. 13, for communication data input from the accessory 1200 to thecamera body 1100.

In the interface circuit shown in FIG. 14, the same components as thoseof the interface circuit shown in FIG. 2C are denoted by the samereference numerals, and description thereof is omitted.

Further, in the communication interface section 1102, an interfacecircuit for a clock signal delivered from the camera body 1100 to theaccessory 1200 is the same as the interface circuit shown in FIG. 2A.Further, in the communication interface section 1102, an interfacecircuit for communication data output from the camera body 1100 to theaccessory 1200 is the same as the interface circuit shown in FIG. 2B.

In the interface circuit shown in FIG. 14, the comparator 393 appearingin FIG. 2C is not included, and the connection terminal 103 c isdirectly connected to a DI_AD terminal (port) of the cameramicrocomputer 1101. The DI_AD terminal is an analog-to-digitalconversion terminal of the camera microcomputer 1101.

FIGS. 15A and 15B are diagrams useful in explaining the communicationinterface section 1202 provided in the accessory 1200 appearing in FIG.13, in which FIG. 15A shows an interface circuit thereof for a clocksignal delivered from the camera body 1100 to the accessory 1200, andFIG. 15B shows an interface circuit thereof for communication dataoutput from the camera body 1100 to the accessory 1200.

In FIGS. 15A and 15B, the same components of the interface circuits asthose of the interface circuits shown in FIGS. 3A and 3B are denoted bythe same reference numerals, and description thereof is omitted.Further, in the communication interface section 1202, an interfacecircuit for communication data input from the accessory 1200 to thecamera body 1100 is the same as the interface circuit shown in FIG. 3C.

In the interface circuit shown in FIG. 15A, the comparators 401 and 403appearing in FIG. 3A are not included, and the connection terminal 203 ais directly connected to a SCLK_AD terminal (port) of the accessorymicrocomputer 1201. The SCLK_AD terminal is an analog-to-digitalconversion terminal of the accessory microcomputer 1201.

In the interface circuit shown in FIG. 15B, the comparator 422 appearingin FIG. 3B is not included, and the connection terminal 203 a isdirectly connected to a DO_AD terminal (port) of the accessorymicrocomputer 1201. The DO_AD terminal is an analog-to-digitalconversion terminal of the accessory microcomputer 1201.

Note that in the camera shown in FIG. 13, states of the communicationterminals (connection terminals) in the first communication method arethe same as in the example described with reference to the timingdiagram shown in FIG. 5. Further, in the camera shown in FIG. 13, statesof the communication terminals (connection terminals) in the secondcommunication method are the same as in the example described withreference to the timing diagram shown in FIG. 6. Further, in the camerashown in FIG. 13, a state of each communication terminal when confirmingconnection of the communication terminals (connection terminals) andshifting the communication method to the second communication method isthe same as in the example described with reference to the timingdiagram shown in FIG. 6.

FIG. 16 is a flowchart of a process for controlling a communicationoperation of the camera microcomputer 1101 appearing in FIG. 13. Thesame steps of the process in FIG. 16 as those of the process in FIG. 7are denoted by the same step numbers, and description thereof isomitted.

After executing the step S102, described with reference to FIG. 7, thecamera microcomputer 1101 determines whether or not the voltage of theconnection terminal 103 c (DI terminal) is higher than the connectionconfirmation voltage Vth_DI2. Here, the camera microcomputer 1101determines whether or not the AD conversion output (DI_AD) of the DI_ADterminal is higher than the level corresponding to the connectionconfirmation voltage Vth_DI2 (step S1103).

If DI_AD>Vth_DI2 holds (YES to the step S1103), the camera microcomputer1101 proceeds to the step S104. On the other hand, if DI_AD≤Vth_DI2holds (NO to the step S1103), the camera microcomputer 1101 proceeds tothe step S120. Then, after executing the step S120, the cameramicrocomputer 1101 returns to the step S1103.

Further, after executing the step S105, described with reference to FIG.7, the camera microcomputer 1101 determines whether or not the ADconversion output of the DI_AD terminal is lower than the levelcorresponding to the connection confirmation voltage Vth_DI2 (stepS1106).

If DI_AD<Vth_DI2 holds (YES to the step S1106), the camera microcomputer1101 proceeds to the step S107. On the other hand, if DI_AD≥Vth_DI2holds (NO to the step S1106), the camera microcomputer 1101 proceeds tothe step S150.

Further, after executing the step S108, described with reference to FIG.7, the camera microcomputer 1101 determines whether or not the ADconversion output of the DI_AD terminal is higher than the levelcorresponding to the connection confirmation voltage Vth_DI2 (stepS1109).

If DI_AD>Vth_DI2 holds (YES to the step S1109), the camera microcomputer1101 proceeds to the step S110. On the other hand, if DI_AD≤Vth_DI2holds (NO to the step S1109), the camera microcomputer 1101 proceeds tothe step S123.

After executing the step S110, the camera microcomputer 1101 determineswhether or not the AD conversion output of the DI_AD terminal is lowerthan the level corresponding to the connection confirmation voltageVth_DI2 (step S1111).

If DI_AD<Vth_DI2 holds (YES to the step S1111), the camera microcomputer1101 determines whether or not the AD conversion output of the DI_ADterminal is higher than the level corresponding to the connectionconfirmation voltage Vth_DI2 (step S1112). Then, if DI_AD>Vth_DI2 holds(YES to the step S1112), the camera microcomputer 1101 proceeds to thestep S113.

On the other hand, if DI_AD≤Vth_DI2 holds (NO to the step S1112), thecamera microcomputer 1101 proceeds to the step S131. Then, if thetimeout period has not elapsed in the step S131, the cameramicrocomputer 1101 returns to the step S1112.

If DI_AD≥Vth_DI2 holds in the step S1111 (NO to the step S1111), thecamera microcomputer 1101 proceeds to the step S130. Then, if thetimeout period has not elapsed in the step S130, the cameramicrocomputer 1101 returns to the step S1112.

FIG. 17 is a flowchart of a process for controlling a communicationoperation of the accessory microcomputer 1201 appearing in FIG. 13. Thesame steps of the process in FIG. 17 as those of the process in FIG. 10are denoted by the same step numbers, and description thereof isomitted.

After starting the communication operation, the accessory microcomputer1201 determines whether or not the voltage of the connection terminal203 b (DO terminal) is higher than the connection confirmation voltageVth_DO2. Here, the accessory microcomputer 1201 determines whether ornot the AD conversion output (DO_AD) of the DO_AD terminal is higherthan a level corresponding to the connection confirmation voltageVth_DO2 (step S1301).

If DO_AD≤Vth_DO2 holds (NO to the step S1301), the accessorymicrocomputer 1201 waits. On the other hand, if DO_AD>Vth_DO2 holds (YESto the step S1301), the accessory microcomputer 1201 proceeds to thestep S302, described with reference to FIG. 10.

After executing the step S304, described with reference to FIG. 10, theaccessory microcomputer 1201 determines whether or not the AD conversionoutput of the DO_AD terminal is higher than the level corresponding tothe connection confirmation voltage Vth_DO2 (step S1305). IfDO_AD≤Vth_DO2 holds (NO to the step S1305), the accessory microcomputer1201 proceeds to the step S330. On the other hand, if DO_AD>Vth_DO2holds (YES to the step S1305), the accessory microcomputer 1201 proceedsto the step S306.

Now, interrupt processes performed by the accessory microcomputer 1201will be described. Note that the SCLK_A terminal interrupt processperformed by the accessory microcomputer 1201 is the same as the SCLK_Aterminal interrupt process described with reference to FIG. 11.

FIG. 18 is a flowchart of a DI_A terminal interrupt process performed bythe accessory microcomputer 1201 appearing in FIG. 13. The same steps ofthe process in FIG. 18 as those of the process in FIG. 12 are denoted bythe same step numbers, and description thereof is omitted.

If it is determined in the step S501, described with reference to FIG.12, that SCLK_A terminal interrupt FLG=H does not hold, the accessorymicrocomputer 1201 determines whether or not the voltage of theconnection terminal 203 b (DO terminal) is higher than the connectionconfirmation voltage Vth_DO2. Here, the accessory microcomputer 1201determines whether or not the AD conversion output level of the DO_ADterminal is higher than the level corresponding to the connectionconfirmation voltage Vth_DO2, and also the AD conversion output level ofthe SCLK_AD terminal (SCLK_AD) is higher than the threshold value Vth_C3(step S1502).

If the AD conversion output level of the DO_AD terminal is not higherthan the level corresponding to the connection confirmation voltageVth_DO2 or the AD conversion output level of the SCLK_AD terminal is nothigher than the threshold value Vth_C3 (NO to the step S1502), theaccessory microcomputer 1201 proceeds to the step S523, described withreference to FIG. 12. On the other hand, if the AD conversion outputlevel of the DO_AD terminal is higher than the level corresponding tothe connection confirmation voltage Vth_DO2 and also the AD conversionoutput level of the SCLK_AD terminal is higher than the threshold valueVth_C3 (YES to the step S1502), the accessory microcomputer 1201proceeds to the step S503.

After executing the step S506, described with reference to FIG. 12, theaccessory microcomputer 1201 determines whether or not the AD conversionoutput level of the SCLK_AD terminal (SCLK_AD) is lower than thethreshold value Vth_C3 (step S1507). That is, the accessorymicrocomputer 1201 determines whether or not the voltage of theconnection terminal 203 a (SCLK terminal) has become the high levelVC_2H (at the time point T6 in FIG. 8).

If SCLK_AD≥Vth_C3 holds (NO to the step S1507), the accessorymicrocomputer 1201 proceeds to the step S521. Then, if the timeoutperiod has not elapsed in the step S521, the accessory microcomputer1201 returns to the step S1507.

If SCLK_AD<Vth_C3 holds (YES to the step S1507), the accessorymicrocomputer 1201 determines whether or not AD conversion output levelof the SCLK_AD terminal (SCLK_AD) is higher than the threshold valueVth_C2 (step S1508).

If SCLK_AD≤Vth_C2 holds (NO to the step S1508), the accessorymicrocomputer 1201 proceeds to the step S523. On the other hand, ifSCLK_AD>Vth_C2 holds (YES to the step S1508), the accessorymicrocomputer 1201 proceeds to the step S509.

As described above, in the second embodiment of the invention, whendetermining the voltage level, the AD conversion terminals provided inthe camera microcomputer 1101 and the accessory microcomputer 1201 areused. This makes it possible to simplify the circuit configurations ofthe communication interface sections 1102 and 1202.

Further, also in the second embodiment, similarly to the firstembodiment, it is possible to perform connection confirmation andswitching to the second communication method (second communication mode)in a manner preventing adverse influence from being exerted on anaccessory device which is compatible only with the first communicationmethod (first communication mode). Further, it is possible to switch tothe second communication method in a short time period withoutperforming communication by the first communication method.

Although in the above-described embodiments, the camera has beendescribed as an example of the electronic apparatus, the invention canbe applied to any other electronic apparatus insofar as it is anelectronic apparatus which connects an accessory device to an electronicapparatus body thereof. Further, although a lighting device has beendescribed as an example of the accessory device, the invention can besimilarly applied to any other accessory device, such as a displaydevice and a communication device, insofar as it is an accessory devicewhich is connected to the electronic apparatus body.

As is clear from the above description, in the example shown in FIG. 1,the camera microcomputer 101 and the communication interface section 102function as a level changing unit and a detection unit. Further, thecamera microcomputer 101 and the communication interface section 102function as a first transmission unit, a second transmission unit, and areception unit. Further, the camera microcomputer 101 and thecommunication interface section 102 function as a first notificationunit and a first determination unit.

The accessory microcomputer 201 and the communication interface section202 function as a second notification unit, a second determination unit,and an informing unit. Further, the camera microcomputer 101 and theaccessory microcomputer 202 function as a first setting unit and asecond setting unit, respectively.

While the invention has been described with reference to exemplaryembodiments, it is to be understood that the invention is not limited tothe disclosed exemplary embodiments. The scope of the following claimsis to be accorded the broadest interpretation so as to encompass allsuch modifications and equivalent structures and functions.

OTHER EMBODIMENTS

Embodiment(s) of the present invention can also be realized by acomputer of a system or apparatus that reads out and executes computerexecutable instructions (e.g., one or more programs) recorded on astorage medium (which may also be referred to more fully as a‘non-transitory computer-readable storage medium’) to perform thefunctions of one or more of the above-described embodiment(s) and/orthat includes one or more circuits (e.g., application specificintegrated circuit (ASIC)) for performing the functions of one or moreof the above-described embodiment(s), and by a method performed by thecomputer of the system or apparatus by, for example, reading out andexecuting the computer executable instructions from the storage mediumto perform the functions of one or more of the above-describedembodiment(s) and/or controlling the one or more circuits to perform thefunctions of one or more of the above-described embodiment(s). Thecomputer may comprise one or more processors (e.g., central processingunit (CPU), micro processing unit (MPU)) and may include a network ofseparate computers or separate processors to read out and execute thecomputer executable instructions. The computer executable instructionsmay be provided to the computer, for example, from a network or thestorage medium. The storage medium may include, for example, one or moreof a hard disk, a random-access memory (RAM), a read only memory (ROM),a storage of distributed computing systems, an optical disk (such as acompact disc (CD), digital versatile disc (DVD), or Blu-ray Disc (BD)™),a flash memory device, a memory card, and the like.

While the present invention has been described with reference toexemplary embodiments, it is to be understood that the invention is notlimited to the disclosed exemplary embodiments. The scope of thefollowing claims is to be accorded the broadest interpretation so as toencompass all such modifications and equivalent structures andfunctions.

This application claims the benefit of Japanese Patent Application No.2014-260285 filed Dec. 24, 2014, which is hereby incorporated byreference herein in its entirety.

What is claimed is:
 1. A lighting device that is capable of connectingto an electronic apparatus, and performs communication between thelighting device and the electronic apparatus connected thereto, thelighting device comprising: a communication contact section having afirst terminal, a second terminal that receives a signal from theelectronic apparatus, and a third terminal that outputs a signal fromthe lighting device to the electronic apparatus, each of the firstterminal, the second terminal, and the third terminal being connectableto the electronic apparatus; and a communication control unit in thelighting device configured to change a voltage level of the thirdterminal in order to notify the electronic apparatus that it is possibleto perform communication in a predetermined communication mode, when avoltage level of the first terminal of the lighting device is at a highlevel and the signal from the electronic apparatus causes apredetermined change of a voltage level of the second terminal of thelighting device.
 2. The lighting device according to claim 1, whereinthe communication control unit switches the voltage level of the thirdterminal between a high level and a low level, the high level being usedfor the communication performed in the predetermined communication modein order to notify the electronic apparatus that it is possible toperform the communication in the predetermined communication mode. 3.The lighting device according to claim 1, wherein the communicationcontrol unit changes the voltage level of the third terminal in order tonotify the electronic apparatus that it is possible to perform thecommunication in the predetermined communication mode, and thereafterperforms the communication in the predetermined communication mode. 4.The lighting device according to claim 1, wherein the communicationcontrol unit changes the voltage level of the third terminal in order tonotify the electronic apparatus that it is possible to perform thecommunication in the predetermined communication mode when the voltagelevel of the first terminal is kept at the high level while the signalfrom the electronic apparatus causes the voltage level of the secondterminal to change from the high level to the low level and thereafterto change from the low level to the high level.
 5. A method ofcontrolling a lighting device that is connectable to an electronicapparatus, can perform communication with the electronic apparatus whenconnected thereto, and includes a first terminal, a second terminal thatreceives a signal from the electronic apparatus, and a third terminalthat outputs a signal from the lighting device to the electronicapparatus, each of the first terminal, the second terminal, and thethird terminal being connectable to the electronic apparatus, the methodcomprising: changing by the lighting device, when a voltage level of thefirst terminal of the lighting device is at a high level and the signalfrom the electronic apparatus causes a predetermined change of a voltagelevel of the second terminal of the lighting device, a voltage level ofthe third terminal in order to notify the electronic apparatus that itis possible to perform communication in a predetermined communicationmode.
 6. The lighting device according to claim 1, wherein thepredetermined change of the voltage level of the second terminalincludes switching the voltage level of the second terminal between ahigh level and a low level which is not 0.